package com.osgix.authorize.dao.impl;

import org.springframework.stereotype.Repository;

import com.osgix.authorize.dao.PrivilegeResourceDao;
import com.osgix.authorize.model.PrivilegeResource;
import com.osgix.common.orm.ibatis.BaseIbatisDao;

@Repository("privilegeResourceDao")
public class PrivilegeResourceDaoImpl extends BaseIbatisDao<PrivilegeResource, Long> implements PrivilegeResourceDao {

	@Override
	public String getIbatisMapperNamesapce() {
		return "PrivilegeResource";
	}

	public void saveOrUpdate(PrivilegeResource privilegeResource) {
		if (privilegeResource.getPrivilegeResource() == null)
			save(privilegeResource);
		else
			update(privilegeResource);
	}

}
